package com.learn.project2.model.vo.wx.cart;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: 尹圣淼
 * @Date: 2022/1/10 23:36
 */
@NoArgsConstructor
@Data
public class CartCheckoutVO2 {

    private Integer grouponRulesId;// 团购规则表的id
    private BigDecimal actualPrice; // 实际付款 =
    private BigDecimal orderTotalPrice ;// 订单费用之和 = goodsTotalPrice + freight_price - coupon_price
    private Integer cartId;  // 购物车的id
    private Integer userCouponId; //
    private Integer couponId; // 优惠券id
    private BigDecimal goodsTotalPrice;// 商品总金额。 checkedAmount
    private Integer addressId; // 地址表id
    private BigDecimal grouponPrice; // 团购规则表的discount(折扣) 整数。
    private BigDecimal couponPrice;// 优惠券价格。
    private Integer availableCouponLength; // 能用的couponLength 能够展示的个数。
    private BigDecimal freightPrice;   // 运费。 运费怎么能是整数呢。

    private CheckedAddressBean checkedAddress; // 选中的那个地址。

    private List<CheckedGoodsListBean> checkedGoodsList; // 购物车的数据

    @NoArgsConstructor
    @Data
    public static class CheckedAddressBean {
        private Integer id;
        private String name;
        private Integer userId;
        private String province;
        private String city;
        private String county;
        private String addressDetail;
        private String areaCode;
        private String tel;
        private Boolean isDefault;
        private String addTime;
        private String updateTime;
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    // 选中的购物车中的商品们（是一个List)即将进行购买。
    public static class CheckedGoodsListBean {
        private Integer id;
        private Integer userId;
        private Integer goodsId;
        private String goodsSn;
        private String goodsName;
        private Integer productId;
        private BigDecimal price;
        private Integer number;
        private String[] specifications;
        private Boolean checked;
        private String picUrl;
        private String addTime;
        private String updateTime;
        private Boolean deleted;

    }
}
